package com.zFace.thread;

import java.util.concurrent.*;

public class AThread implements Callable {

	public Object call() throws Exception {
		return "thread";
	}

	public static void main(String[] args) {
		ExecutorService executorService = Executors.newSingleThreadExecutor();
		Future submit = executorService.submit(new AThread());
		try {
			Object o = submit.get();
			System.out.println(o.toString());
		} catch (InterruptedException e) {
			e.printStackTrace();
		} catch (ExecutionException e) {
			e.printStackTrace();
		}
	}
}

